var app = app || {};
(function() {
	//时钟
	app.Clock = React.createClass({
		getInitialState: function() {
			return {
				now: new Date()
			};
		},
		componentDidMount: function() {
			var that = this;
			setInterval(function() {
				that.setState({
					now: new Date,
				});
			}, 1000);
		},
		render: function() {
			return (
				<h3 className="ui dividing header tl">
					<i className="wait icon"></i>
            		<div className="content">
                		{this.state.now.format("yyyy-MM-dd")}
                		<div className="sub header">{this.state.now.format("hh:mm:ss")}</div>
					</div>
        		</h3>
			);
		}
	});
})();